<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>新闻信息列表</title>
		<meta name="keywords" content="新闻,发布,系统">
		<meta name="description" content="新闻发布系统">
		<%@ include file="../public/head.jspf"%>
		<style type="text/css">
			.box{width:600px;}
			.box .content{width:580px;}
			.btn{font-size:12px;}
		</style>
	</head>
	<body>
		<div class="box">
			<h1>新闻信息发布系统<a class="back">返回</a></h1>
			<div class="content">
				<div id="data">
					<table id="datalist">
						<caption>新闻信息列表</caption>
						<tr>
			                <th>ID</th>
			                <th>标题</th>
			                <th>作者</th>
			                <th>来源</th>
			                <th>内容</th>
			                <th>添加时间</th>
			                <th>
			                	操作
			                	<input type="button" value="添加" class="btn blue" onclick="location.href='addui.news';" />
			                </th>
			            </tr>
						<c:forEach items="${news}" var="news">
							<tr> 
								<td>${news.newsid}</td>
								<td>${news.title}</td>
								<td>${news.author}</td>
								<td>${news.source}</td>
								<td>${news.content}</td>
								<td>${news.time}</td>
								<td class="td_modi">
									<input type="button" value="修改" class="btn green" onclick="location.href='updateui.news?newsid=${news.newsid}';" />
									<input type="button" value="删除" class="btn red" onclick="if(confirm('确定要删除此记录吗？')==true)location.href='del.news?newsid=${news.newsid}'" />
								</td>
							</tr>
						</c:forEach>
					</table>
				</div>
			</div>
		</div>
	</body>
</html>